package tech.aistar.design.template.jdbc.demo02;


import tech.aistar.design.template.jdbc.demo01.TeacherDao;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2021/3/16 10:40 上午
 */
public class TeacherImpl extends TeacherDao {
    @Override
    public void delById(int id) {
        DBTemplate.execute(new DBCallback() {
            @Override
            public String executeSql() {
                return "delete from tbl_user where id="+id;
            }
        });
    }

    @Override
    public void findAll() {
        DBTemplate.execute(new DBCallback() {
            @Override
            public String executeSql() {
                return "select * from user";
            }
        });
    }
}
